<?php
	class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
		
     
        
        protected function _initDB()
        {
        	$dbConfig = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini','database');
			
			Zend_Registry::set('dbConfig',$dbConfig);
			
            $db = Zend_Db::factory($dbConfig->resource->db->adapter,$dbConfig->resource->db->params->toArray());
			
            $db->setFetchMode(Zend_Db::FETCH_BOTH);
			
            $db->query("SET NAMES 'utf8'");
            $db->query("SET CHARACTER SET 'utf8'"); 
			Zend_Registry::set('db',$db);
			
			$profiler=$db->getProfiler();
			$profiler->setEnabled(true);
			
            Zend_Db_Table::setDefaultAdapter($db);
			
            return $db;
        } 
	}
?>